'use strict';
app.controller('rechargeRecordCtrl', ['$scope', '$stateParams', '$modal', '$filter','utilService', 'toaster', function ($scope, $stateParams, $modal,$filter,utilService, toaster) {

    $scope.rechargeRecordVO = {};

    // call server.
    $scope.query = function () {
        if($scope.rechargeRecordVO.startTime != null){
            $scope.rechargeRecordVO.startTime= $filter("date")($scope.rechargeRecordVO.startTime, "yyyy-MM-dd");
        }
        if($scope.rechargeRecordVO.endTime != null){
            $scope.rechargeRecordVO.endTime= $filter("date")($scope.rechargeRecordVO.endTime, "yyyy-MM-dd");
        }
        utilService.queryForPagingList($scope, {
            url: $scope.app.domain + 'recharge/record/all',
            params: $scope.rechargeRecordVO
        }).then(function (result) {
        });

    }
    $scope.query();
}]);